# coding = utf8

import re


def test_re_error():
    try:
        ps = r'(\w.)*+'
        pe = re.compile(ps)
    except re.error as er:
        print('Error:', er)
        print('re.error attributes: \n\tmsg: {}\n\tpattern: {}\n\tpos: {}\n\tlineno: {}\n\tcolno: {}'.
              format(er.msg, er.pattern, er.pos, er.lineno, er.colno))


if __name__ == '__main__':
    test_re_error()
